package com.ea.eadp.nexus.test.pageDefinition.console;

import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;

public class EnterAccountPage extends ConsoleBasePage {

	public EnterAccountPage(WebDriver driver) {
		super(driver, EnterAccountPage.class, "panel-email-verify");
	}

    public void startSignup(){
        this.sendControllerKey('A');
    }

    public void fillParentEmail(String parentEmail) throws Exception {
        JavascriptExecutor jse = (JavascriptExecutor) driver;
        jse.executeScript("$(\"#parentEmail\").val(\"" + parentEmail + "\").blur()");
    }

	public void fillEmail(String email) throws Exception {
        JavascriptExecutor jse = (JavascriptExecutor) driver;
        jse.executeScript("$(\"#email\").val(\"" + email + "\").blur()");
	}

    public void fillPassword(String password) throws Exception {
        JavascriptExecutor jse = (JavascriptExecutor) driver;
        jse.executeScript("$(\"#password\").val(\"" + password + "\").blur()");
    }

    public void fillConfirmPassword(String password) throws Exception {
        JavascriptExecutor jse = (JavascriptExecutor) driver;
        jse.executeScript("$(\"#confirmPassword\").val(\"" + password + "\").blur()");
    }

    public void fillOriginId(String originId) throws Exception{
        JavascriptExecutor jse = (JavascriptExecutor) driver;
        jse.executeScript("$(\"#originId\").val(\"" + originId + "\").blur()");
    }
}
